<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: participant.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>
  
<?php if ($this->isPart): ?>

<div class="vote-participant-badge">

  <div class="left">
    <div class="photo">
      <?php echo $this->itemPhoto($this->participant, 'thumb.profile'); ?>
    </div>
  </div>
  
  <div class="right">
    <div class="info">
      <div class="item_title">
        <?php echo $this->htmlLink($this->participant->getHref(), $this->participant->getTitle()); ?>
      </div>
      <div class="rate">
        <?php echo $this->objectRate($this->participant, $this->canVote); ?>
      </div>
      <div class="item_description">
        <?php echo $this->participant->getDescription(); ?>
      </div>
      <div class="item_details">
        <ul class="vote_browse_info_misc">
          <?php if ($this->participant->view_count > 0): ?>
            <li class="views">
              <span class="label"><?php echo $this->translate('Views'); ?></span>
              <span class="value"><?php echo $this->translate(array('%s view', '%s views', $this->participant->view_count), $this->participant->view_count); ?></span>
              <div class="clr"></div>
            </li>
          <?php endif; ?>
          <?php if ($this->participant->vote_count > 0): ?>
            <li class="votes">
              <span class="label"><?php echo $this->translate('Votes'); ?></span>
              <span class="value"><?php echo $this->ratersFluentList($this->participant); ?></span>
              <div class="clr"></div>
            </li>
          <?php endif; ?>
          <?php if ($this->participant->comment_count > 0): ?>
            <li class="comments">
              <span class="label"><?php echo $this->translate('Comments'); ?></span>
              <span class="value"><?php echo $this->translate(array('%s comment', '%s comments', $item->comment_count), $this->participant->comment_count); ?></span>
              <div class="clr"></div>
            </li>
          <?php endif; ?>
        </ul>
      </div>
      <?php if (!$this->subject->isFinished()): ?>
      <div class="item_options">
        <?php echo $this->htmlLink($this->url(array('controller' => 'vote', 'action' => 'disqualify', 'format' => 'smoothbox', 'id' => $this->participant->getIdentity()), 'vote_general'), $this->translate('Disqualification'), array('class' => 'smoothbox delete')); ?>
      </div>
      <?php endif; ?>
    </div>
  </div>

  <div class="clr"></div>
</div>

<?php else: ?>

<div class="vote-participant-form">
  <?php echo $this->form->render($this); ?>
</div>

<?php endif; ?>